﻿using System;
using System.Data;
using System.Configuration;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Web.Mvc;

namespace CNTVNow.Web.Helpers.ExtensionMethods
{
    public static class WebFiles
    {
        /*Begin Get file of Javascript Script*/
        /// <summary>
        /// Root folder Javascript
        /// </summary>
        /// <param name="helper"></param>
        /// <returns></returns>
        public static string GetUrlJsSrcipt(this UrlHelper helper)
        {
            return helper.Content(ConfigurationManager.AppSettings["JsScript"].ToString());
        }
        public static string GetUrlJsSrcipt(this UrlHelper helper, string fileName)
        {
            return helper.Content("{0}/{1}".FormatWith(ConfigurationManager.AppSettings["JsScript"].ToString(),fileName));
        }
        /// <summary>
        /// Library
        /// </summary>
        /// <param name="helper"></param>
        /// <returns></returns>
        public static string GetUrlJsSrciptLibrary(this UrlHelper helper)
        {
            return helper.Content(ConfigurationManager.AppSettings["JsScriptLibrary"].ToString());
        }
        public static string GetUrlJsSrciptLibrary(this UrlHelper helper, string fileName)
        {
            return helper.Content("{0}/{1}".FormatWith(ConfigurationManager.AppSettings["JsScriptLibrary"].ToString(),fileName));
        }
        /// <summary>
        /// Common
        /// </summary>
        /// <param name="helper"></param>
        /// <returns></returns>
        public static string GetUrlJsSrciptCommon(this UrlHelper helper)
        {
            return helper.Content(ConfigurationManager.AppSettings["JsScriptCommon"].ToString());
        }
        public static string GetUrlJsSrciptCommon(this UrlHelper helper, string fileName)
        {
            return helper.Content("{0}/{1}".FormatWith(ConfigurationManager.AppSettings["JsScriptCommon"].ToString(), fileName));
        }
        /// <summary>
        /// Home
        /// </summary>
        /// <param name="helper"></param>
        /// <returns></returns>
        public static string GetUrlJsSrciptHome(this UrlHelper helper)
        {
            return helper.Content(ConfigurationManager.AppSettings["JsScriptHome"].ToString());
        }
        public static string GetUrlJsSrciptHome(this UrlHelper helper, string fileName)
        {
            return helper.Content("{0}/{1}".FormatWith(ConfigurationManager.AppSettings["JsScriptHome"].ToString(),fileName));
        }
        /// <summary>
        /// News
        /// </summary>
        /// <param name="helper"></param>
        /// <returns></returns>
        public static string GetUrlJsSrciptNews(this UrlHelper helper)
        {
            return helper.Content(ConfigurationManager.AppSettings["JsScriptNews"].ToString());
        }
        public static string GetUrlJsSrciptNews(this UrlHelper helper, string fileName)
        {
            return helper.Content("{0}/{1}".FormatWith(ConfigurationManager.AppSettings["JsScriptNews"].ToString(),fileName));
        }
        /// <summary>
        /// Sport
        /// </summary>
        /// <param name="helper"></param>
        /// <returns></returns>
        public static string GetUrlJsSrciptSport(this UrlHelper helper)
        {
            return helper.Content(ConfigurationManager.AppSettings["JsScriptSport"].ToString());
        }
        public static string GetUrlJsSrciptSport(this UrlHelper helper, string fileName)
        {
            return helper.Content("{0}/{1}".FormatWith(ConfigurationManager.AppSettings["JsScriptSport"].ToString(),fileName));
        }
        /// <summary>
        /// Music
        /// </summary>
        /// <param name="helper"></param>
        /// <returns></returns>
        public static string GetUrlJsSrciptMusic(this UrlHelper helper)
        {
            return helper.Content(ConfigurationManager.AppSettings["JsScriptMusic"].ToString());
        }
        public static string GetUrlJsSrciptMusic(this UrlHelper helper, string fileName)
        {
            return helper.Content("{0}/{1}".FormatWith(ConfigurationManager.AppSettings["JsScriptMusic"].ToString(),fileName));
        }
        /// <summary>
        /// Movie
        /// </summary>
        /// <param name="helper"></param>
        /// <returns></returns>
        public static string GetUrlJsSrciptMovie(this UrlHelper helper)
        {
            return helper.Content(ConfigurationManager.AppSettings["JsScriptMovie"].ToString());
        }
        public static string GetUrlJsSrciptMovie(this UrlHelper helper, string fileName)
        {
            return helper.Content("{0}/{1}".FormatWith(ConfigurationManager.AppSettings["JsScriptMovie"].ToString(),fileName));
        }
        /// <summary>
        /// Life Style
        /// </summary>
        /// <param name="helper"></param>
        /// <returns></returns>
        public static string GetUrlJsSrciptLifeStyle(this UrlHelper helper)
        {
            return helper.Content(ConfigurationManager.AppSettings["JsScriptLifeStyle"].ToString());
        }
        public static string GetUrlJsSrciptLifeStyle(this UrlHelper helper, string fileName)
        {
            return helper.Content("{0}/{1}".FormatWith(ConfigurationManager.AppSettings["JsScriptLifeStyle"].ToString(), fileName));
        }
        /// <summary>
        /// CNTV live
        /// </summary>
        /// <param name="helper"></param>
        /// <returns></returns>
        public static string GetUrlJsSrciptCNTVlive(this UrlHelper helper)
        {
            return helper.Content(ConfigurationManager.AppSettings["JsScriptCNTVlive"].ToString());
        }
        public static string GetUrlJsSrciptCNTVlive(this UrlHelper helper, string fileName)
        {
            return helper.Content("{0}/{1}".FormatWith(ConfigurationManager.AppSettings["JsScriptCNTVlive"].ToString(), fileName));
        }
        /*End Javascript*/

        /*Begin content*/
        public static string GetUrlContent(this UrlHelper helper)
        {
            return helper.Content(ConfigurationManager.AppSettings["Content"].ToString());
        }
        public static string GetUrlContent(this UrlHelper helper, string fileName)
        {
            return helper.Content("{0}/{1}".FormatWith(ConfigurationManager.AppSettings["Content"].ToString(), fileName));
        }
        public static string GetUrlContentCommon(this UrlHelper helper)
        {
            return helper.Content(ConfigurationManager.AppSettings["ContentCommon"].ToString());
        }
        public static string GetUrlContentCommon(this UrlHelper helper, string fileName)
        {
            return helper.Content("{0}/{1}".FormatWith(ConfigurationManager.AppSettings["ContentCommon"].ToString(),fileName));
        }
        public static string GetUrlContentHome(this UrlHelper helper)
        {
            return helper.Content(ConfigurationManager.AppSettings["ContentHome"].ToString());
        }
        public static string GetUrlContentHome(this UrlHelper helper, string fileName)
        {
            return helper.Content("{0}/{1}".FormatWith(ConfigurationManager.AppSettings["ContentHome"].ToString(),fileName));
        }
        public static string GetUrlContentNews(this UrlHelper helper)
        {
            return ConfigurationManager.AppSettings["ContentNews"].ToString();
        }
        public static string GetUrlContentSport(this UrlHelper helper)
        {
            return ConfigurationManager.AppSettings["ContentSport"].ToString();
        }
        public static string GetUrlContentMusic(this UrlHelper helper)
        {
            return ConfigurationManager.AppSettings["ContentMusic"].ToString();
        }
        public static string GetUrlContentMovie(this UrlHelper helper)
        {
            return ConfigurationManager.AppSettings["ContentMovie"].ToString();
        }
        public static string GetUrlContentLifeStyle(this UrlHelper helper)
        {
            return ConfigurationManager.AppSettings["ContentLifeStyle"].ToString();
        }
        public static string GetUrlContentCNTVlive(this UrlHelper helper)
        {
            return ConfigurationManager.AppSettings["ContentCNTVlive"].ToString();
        }
        /*End content*/
        public static string GetUrlImageNews(this UrlHelper helper, string fileName)
        {
            return helper.Content("{0}/{1}".FormatWith(ConfigurationManager.AppSettings["Uploads"].ToString(), fileName));
        }
    }
}

